"""无人机模块page内容"""
from selenium.webdriver.common.by import By

from base.base_page import BasePage


class UavPage(BasePage):
    """ 无人机相关element"""
    # 无人机模块图片 定位时候出现多个重复的元素 要给前面加上一层括号
    uav = (By.XPATH, "(//*[contains(text(),'无人机现场巡检')])[2]")
    """新增"""
    # 新增按钮
    uav_add = (By.XPATH, "//span[text()='新增']")
    # 查询按钮
    uav_list = (By.XPATH, "//span[text()='查询']")
    # 导出按钮
    uav_export = (By.XPATH, "//span[text()='导出']")
    # 拍摄日期
    uav_time = (By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[1]/div/div/div[1]/input')
    # 选择日期到16号
    uav_time_16 = (By.XPATH, "/html/body/div[3]/div[1]/div/div[2]/table[1]/tbody/tr[5]/td[1]/div/span")
    # 上传人
    uploader = (By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[2]/div/div/div[1]/input')
    # 影像类型
    image_type = (
        By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[3]/div/div/div/div/input')
    # 图片影像
    image = (By.XPATH, "(//span[text()='图片'])[2]")
    # 巡检影响上传图片
    inspection_image = (
        By.XPATH,
        '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[4]/div/div/div/div/div/div/div/div')
    # 取消按钮
    cancel_button = (By.XPATH, "//span[text()='取消']")
    # 确定按钮
    confirm_button = (By.XPATH, "//span[text()='确定']")
    # x号按钮
    x_button = (By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[1]/button/i')
    # 上传成功
    success_uav = (By.XPATH, "//p[text()='保存成功']")
    # 提示请上传影像提示
    error_prompt = (By.XPATH, "//p[text()='请上传巡检影像']")
    """编辑"""
    # 编辑按钮
    auv_edit = (By.XPATH, "//span[text()='编辑']")
    # 编辑拍摄日期
    uav_edit_time = (
        By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[1]/div/div/div/input')
    # 编辑上传人
    uploader_edit = (
        By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form/div/div[2]/div/div/div/input')
    # 视频影像
    video = (By.XPATH, "(//span[text()='视频'])[2]")
    """删除"""
    # 删除按钮
    uav_del = (By.XPATH, "//span[text()='删除']")
    # 确定删除按钮
    uav_del_confirm = (By.CSS_SELECTOR,'body > div.el-message-box__wrapper > div > div.el-message-box__btns > '
                                       'button.el-button.el-button--default.el-button--small.el-button--primary')
    # 删除成功提示
    del_success = (By.XPATH, "//p[text()='删除成功']")
    # form框架
    uav_from = (By.XPATH, '//*[@id="route-content"]/div[2]/div[3]/div/div/div[2]/form')
